﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestSwfUpload.Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="../jquery/jquery-1.9.1.js"></script>
    <script src="/swfupload/swfupload.js"></script>
    <script src="/swfupload/handlers.js" charset="gbk"></script>

    <script type="text/javascript">
        var swfu;
        $(function () {

            //绑定批量上传控件
            swfu = new SWFUpload({
                // Backend Settings
                upload_url: "/Handler/upload.ashx",
                post_params: {
                    "ASPSESSID": "1"
                },

                // File Upload Settings
                file_size_limit: "2 MB",
                file_types: "*.jpg",
                file_types_description: "JPG Images",
                file_upload_limit: "0",    // Zero means unlimited

                // Event Handler Settings - these functions as defined in Handlers.js
                //  The handlers are not part of SWFUpload but are part of my website and control how
                //  my website reacts to the SWFUpload events.
                file_queue_error_handler: fileQueueError,
                file_dialog_complete_handler: fileDialogComplete,
                upload_progress_handler: uploadProgress,
                upload_error_handler: uploadError,
                upload_success_handler: uploadSuccess,
                upload_complete_handler: uploadComplete,

                // Button settings
                //button_image_url: "/images/upload.jpg",
                button_placeholder_id: "buttonPlaceholder",
                button_width: 160,
                button_height: 22,
                button_text: '<span class="button">选择图片 <span class="buttonSmall">(最大2M)</span></span>',
                button_text_style: '.button { font-family: Helvetica, Arial, sans-serif; font-size: 14pt; background:#000; } .buttonSmall { font-size: 10pt; }',
                button_text_top_padding: 1,
                button_text_left_padding: 5,

                // Flash Settings
                flash_url: "/swfupload/swfupload.swf",	// Relative to this file

                custom_settings: {
                    upload_target: "fileUploadProgress"
                },

                // Debug Settings
                debug: false
            });

        })
    </script>
</head>
<body>
    <form id="form1" runat="server">

        <span id="buttonPlaceholder"></span>

        <div id="fileUploadProgress"></div>
        <div id="thumbnails"></div>
    </form>
</body>
</html>
